package com.qingcloud.fexecutor.base.enums;

/**
 * 数据集操作类型枚举.
 *
 * @author wangjinnan
 */
public enum MallCategoryEnum {

    WEB_APP(1, "前端模板"),
    JOB_COMPONENT(2, "作业组件"),
    SOFTWARE(3, "标准软件"),
    SERVICE(4, "业务服务");

    /**
     * 类型编码
     */
    public final Integer code;
    public final String desc;

    MallCategoryEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(Integer code) {
        for (MallCategoryEnum it : MallCategoryEnum.values()) {
            if (it.code.equals(code)) {
                return it.desc;
            }
        }
        return "";
    }

}
